import {reqSearchInfo} from "@/api"

const actions = {
    async getSerarchList(context,parms={}) {
        let result = await reqSearchInfo(parms)
        if (result.code === 200) {
            context.commit('GETSEARCHLIST', result.data)
        }
    },
}

const mutations = {
    GETSEARCHLIST(state,myinfo)
    {
        state.searchInfo=myinfo
    }
}

const state = {
    searchInfo:{
        
    }
}

const getters = {
    goodsList(state)
    {
        return state.searchInfo.goodsList||[]
    },
    attrsList(state)
    {
        return state.searchInfo.attrsList
    },
    trademarkList(state)
    {
        return state.searchInfo.trademarkList
    }
}

export default {
    actions,
    mutations,
    state,
    getters
}